package net.mikoo.seals.biz.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;

import net.mikoo.seals.model.ApplyVerify;
import net.mikoo.seals.model.ApplyVerifyQuery;

@MapperScan
public interface ApplyVerifyMapper {
	
	Integer insert(ApplyVerify applyVerify);
	
	Integer update(ApplyVerify applyVerify);
	
	ApplyVerify selectInfoById(Long applyVerifyId);
	
	List<ApplyVerify> selectByQueryToPage(ApplyVerifyQuery query);
	
	Integer countByQueryToPage(ApplyVerifyQuery query);
	
	ApplyVerify selectInfoByQuery(ApplyVerifyQuery query);
	
	Integer delete(ApplyVerify applyVerify);
	
	List<ApplyVerify> selectListByQuery(ApplyVerifyQuery query);

	//获取下一个审核人
	//Long selectNextVerifyParty(@Param("applyId")Long applyId,@Param("workflowId")Long workflowId,@Param("currentPartyId")Long currentPartyId);
	//Long selectNextVerify(@Param("applyId")Long applyId,@Param("currentPartyId")Long currentPartyId);

	Integer updateChangeStatus(ApplyVerify verify);

	ApplyVerify selectNextVerifyByCurrent(ApplyVerify verify);

	List<ApplyVerify> selectHaveVerifyByCurrent(ApplyVerify verify);

	/**
	 * 更新为撤回状态
	 * @param applyId
	 */
	void updateToRetractByApplyId(Long applyId);

}